<?

global $_APP_SESSION_THEME;

require_once ("{$_APP_SESSION_THEME}/template.main.inc");

global $_OBJECT_IFACE;

$_OBJECT_IFACE = new Container ();
$_OBJECT_IFACE->set_callback_begin ("_app_load_iface_begin");
$_OBJECT_IFACE->set_callback_end ("_app_load_iface_end");

global $_OBJECT_IFACE_HEAD;

$_OBJECT_IFACE_HEAD = new Container ();
$_OBJECT_IFACE_HEAD->set_callback_begin ("_app_iface_head_begin");
$_OBJECT_IFACE_HEAD->set_callback_end ("_app_iface_head_end");

global $_OBJECT_IFACE_HEAD_MENU;

$_OBJECT_IFACE_HEAD_MENU = new Container ();
$_OBJECT_IFACE_HEAD_MENU->set_callback_begin ("_app_iface_head_navigation");
$_OBJECT_IFACE_HEAD_MENU->set_option ("callback_end", false);

$_OBJECT_IFACE_HEAD->insert_container ($_OBJECT_IFACE_HEAD_MENU);

global $_OBJECT_IFACE_MAIN;

$_OBJECT_IFACE_MAIN = new Container ();
$_OBJECT_IFACE_MAIN->set_callback_begin ("_app_iface_begin");
$_OBJECT_IFACE_MAIN->set_callback_end ("_app_iface_end");

global $_OBJECT_IFACE_FOOT;
global $_OBJECT_IFACE_DETAILS;

$_OBJECT_IFACE_FOOT = new Container ();
$_OBJECT_IFACE_FOOT->set_callback_begin ("_app_iface_foot_begin");
$_OBJECT_IFACE_FOOT->set_callback_end ("_app_iface_foot_end");

$_OBJECT_IFACE->insert_container ($_OBJECT_IFACE_HEAD);

if (! isset ($_SESSION["_APP_SESSION"])) {

	$_OBJECT_IFACE_LOGIN = new Container ();
	$_OBJECT_IFACE_LOGIN->set_callback_begin ("_app_session_login");
	$_OBJECT_IFACE_LOGIN->set_option ("callback_end", false);
	#$_OBJECT_IFACE->insert_container ($_OBJECT_IFACE_LOGIN);
} else {
	/* $_OBJECT_IFACE_LOGOUT = new Container ();
	$_OBJECT_IFACE_LOGOUT->set_callback_begin ("_app_session_logout");
	$_OBJECT_IFACE_LOGOUT->set_option ("callback_end", false);
	$_OBJECT_IFACE->insert_container ($_OBJECT_IFACE_LOGOUT); */

	#$_OBJECT_IFACE_MESSAGING = _app_create_context_panel ();
	#$_OBJECT_IFACE_DETAILS = _app_create_panel_details ();
	#$_OBJECT_IFACE_PANEL = _app_create_iface_panel ("Projects", "panel_a");

	if (isset ($_SESSION["_APP_SESSION"])) {

		#$_OBJECT_IFACE_MESSAGES = new Container ();
		#$_OBJECT_IFACE_MESSAGES->set_callback_begin ("_app_session_messages");
		#$_OBJECT_IFACE_MESSAGES->set_option ("callback_end", false);
		#$_OBJECT_IFACE_PANEL->insert_container ($_OBJECT_IFACE_MESSAGES);
	}

	#$_OBJECT_IFACE_MESSAGING->insert_container ($_OBJECT_IFACE_PANEL);
	#$_OBJECT_IFACE->insert_container ($_OBJECT_IFACE_MESSAGING);
	#$_OBJECT_IFACE->insert_container ($_OBJECT_IFACE_DETAILS);


	$_OBJECT_IFACE->insert_container ($_OBJECT_IFACE_MAIN);
}

$_OBJECT_IFACE->insert_container ($_OBJECT_IFACE_FOOT);

?>
